bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec...
authorSerhiy Storchaka <storchaka@gmail.com>
Thu, 14 Oct 2021 18:23:52 +0000 (21:23 +0300)
committerArnaud Rebillout <arnaudr@debian.org>
Tue, 14 Apr 2026 04:38:32 +0000 (11:38 +0700)
commitf4b01614c9eda6f5dc0e3deef3f875f7c0da8520
tree2ff54dd840af7a6e8f1552bb88b942e7578a6509
parent95d0fedb8ae0c6a001a4c8122288abe22242f13a
bpo-45467: Fix IncrementalDecoder and StreamReader in the "raw-unicode-escape" codec (GH-28944) (GH-28953)

They support now splitting escape sequences between input chunks.

Add the third parameter "final" in codecs.raw_unicode_escape_decode().
It is True by default to match the former behavior.

(cherry picked from commit 39aa98346d5dd8ac591a7cafb467af21c53f1e5d)

Origin: upstream, https://github.com/python/cpython/commit/684860280687561f6312e206c4ccfbe4baa17e89

Gbp-Pq: Name CVE-2025-4516-2.patch
Include/cpython/unicodeobject.h
Lib/encodings/raw_unicode_escape.py
Lib/test/test_codecs.py
Misc/NEWS.d/next/Library/2021-10-14-13-31-19.bpo-45467.Q7Ma6A.rst [new file with mode: 0644]
Modules/_codecsmodule.c
Modules/clinic/_codecsmodule.c.h
Objects/unicodeobject.c